
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<c:set var="wishlists" scope="session"
	value="${sessionScope.wishlists}" />
<c:choose >
	<c:when test="${wishlists.size() > 0}">
	<form name="wishlists" action="wishlists.do" method="get">
	<table  width="100%" border="1" cellspacing="0" cellpadding="5">
		<tr bgcolor="#666666">
			<td class="bgColorMain"><strong><font
					color="#FFFFFF">WISH LIST</font></strong></td>
		</tr>
		<tr>
			<td>

				<table width="100%" border="1" cellspacing="0" cellpadding="5">
					<tr align="center" style="background-color:  #add8f2">
						<td width="6%"><strong>ORDER NUMBER</strong></td>
						<td width="10%"><strong>IMAGE</strong></td>
						<td><strong>PRODUCT NAME</strong></td>
						<td width="15%"><strong>DATE ADD</strong></td>
						<td width="15%"><strong>PRICE</strong></td>
						<td width="15%"><strong>ADD TO CART</strong></td>
						<td width="10%"><strong>DELETE</strong></td>
					</tr>
					<c:set var="sumprice" value="0" />
					<c:if test="${wishlists.size() > 0}">
						<c:forEach var="i" begin="0" end="${wishlists.size()-1}">
							<c:set var="pr" value="${wishlists[i].products}" />
							<tr valign="top">
								<td align="center">${i+1 }</td>
								<td width="9%" align="center"><a
									href="ProductDetail.do?productid=${pr.productid}"><img
										src="${pr.image1}" alt="#" width="57" height="85" border="0" /></a></td>
								<td><a href="ProductDetail.do?productid=${pr.productid}">${pr.productname}</a></td>
								<td align="right">${wishlists[i].dateadd}</td>
								<td align="right">${pr.price}</td>
								<td align="center"><a
									href="Cart.do?productid=${pr.productid}">Add to Cart</a></td>
								<td align="center"><a
									href="DeleteProductWishlist.do?productid=${pr.productid}" >Delete</a></td>
							</tr>
						</c:forEach>
					</c:if>
				</table> <br />
				<table width="100%">
					<tr valign="top">
						<td align="center"><a href="Products.do"><img
								src="images/continueshopping.png" alt="#" border="0" /></a></td>
					</tr>
				</table>

			</td>
		</tr>
	</table>
</form>
	</c:when>
	<c:otherwise>
		<table  width="100%" border="1" cellspacing="0" cellpadding="5">
			<tr bgcolor="#666666">
				<td class="bgColorMain"><strong><font
						color="#FFFFFF">No product in Wishlist! Press <a style="color:red" href="Products.do">here</a> to continue shopping</font></strong></td>
			</tr>
		</table>
	</c:otherwise>
</c:choose>